home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Ebooks / Thinking in C++ V2 / C26 / CGI_POST.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-25  |  607 b   |  23 lines

  1. //: C26:CGI_POST.cpp
  2. // From Thinking in C++, 2nd Edition
  3. // Available at http://www.BruceEckel.com
  4. // (c) Bruce Eckel 1999
  5. // Copyright notice in Copyright.txt
  6. // CGImap works as easily with POST as it
  7. // does with GET. 
  8. #include "CGImap.h"
  9. #include <iostream>
  10. using namespace std;
  11.  
  12. int main() {
  13.   cout << "Content-type: text/plain\n" << endl;
  14.   Post p; // Get the query string
  15.   CGImap query(p);
  16.   // Test: dump all names and values
  17.   for(CGImap::iterator it = query.begin();
  18.     it != query.end(); it++) {
  19.     cout << (*it).first << " = "
  20.       << (*it).second << endl;
  21.   }
  22. } ///:~
  23.